﻿<%@ Page Language="C#" AutoEventWireup="true" Inherits="Report_OrderStatistics" Codebehind="OrderStatistics.aspx.cs" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>无标题页</title>
    <script type="text/javascript" src="../Include/JS/calendar.js"></script>
    <script type="text/javascript" src="../Include/Js/PopupCalendar.js"></script>
    <script type="text/javascript" src="../Include/Js/OpenWindow.js"></script>
    <script type="text/javascript" language="javascript">
    
    function getOrderFrom(path)
    {
        var orderFrom=window.showModalDialog(path+"DialogBoxHostFrame.aspx?url=Report/SelectOrderFrom.aspx",window,"status:off;center=yes;edge:raised;dialogHeight:525px;dialogWidth:530px;help:0;resizable:0;scrollbar=0");
        if(orderFrom==undefined)
        {
            document.all("DDL_OrderFrom").value="";//没有选择支付方式时，默认是现金支付

        }
        else
        {
            document.all("DDL_OrderFrom").value=orderFrom;
        }
    }
    function GetSuggestion(path)
    {
        var suggestion=window.showModalDialog(path+"DialogBoxHostFrame.aspx?url=Report/SelectSuggestion.aspx",window,"status:off;center=yes;edge:raised;dialogHeight:525px;dialogWidth:530px;help:0;resizable:0;scrollbar=0");
        if(suggestion==undefined)
        {
            document.all("DDL_ORDER_STATETYPECODE").value="";//没有选择支付方式时，默认是现金支付

        }
        else
        {
            document.all("DDL_ORDER_STATETYPECODE").value=suggestion;
        }
    }
    function GetPayType(path)
    {
        var payType=window.showModalDialog(path+"DialogBoxHostFrame.aspx?url=Report/SelectPayType.aspx",window,"status:off;center=yes;edge:raised;dialogHeight:525px;dialogWidth:530px;help:0;resizable:0;scrollbar=0");
        if(payType==undefined)
        {
            document.all("DDL_PayType").value="";//没有选择支付方式时，默认是现金支付

        }
        else
        {
            document.all("DDL_PayType").value=payType;
        }
    }
    function GetDealType(path)
    {
        var dealType=window.showModalDialog(path+"DialogBoxHostFrame.aspx?url=Report/SelectDealType.aspx",window,"status:off;center=yes;edge:raised;dialogHeight:525px;dialogWidth:530px;help:0;resizable:0;scrollbar=0");
        if(dealType==undefined)
        {
            document.all("DDL_tradetype").value="";//没有选择支付方式时，默认是现金支付

        }
        else
        {
            document.all("DDL_tradetype").value=dealType;
        }
    }
    function GetOperator(path,objId)
    {
        var operator=window.showModalDialog(path+"DialogBoxHostFrame.aspx?url=Report/SelectOperator.aspx",window,"status:off;center=yes;edge:raised;dialogHeight:525px;dialogWidth:530px;help:0;resizable:0;scrollbar=0");
        if(operator==undefined)
        {
            document.all(objId).value="";//没有选择支付方式时，默认是现金支付

        }
        else
        {
            document.all(objId).value=operator;
        }
    }
    </script>
    <style type="text/css">
body {font-size:12px;margin:0;padding:0;}
a:visited{text-decoration:none;color:slategray;}
a:hover{text-decoration:underline;color:slategray;}
a:link{text-decoration:none;color:slategray;}
.juli {margin-top:10px;padding-left:0px;}
.z1{background-color:#e7e7e7; text-align:left; line-height:20px;}
.z2{background-color:#FFFFFF; text-align:left; line-height:20px;}
.zt3 {text-align:center; font-weight:600; color:#000000;}
.zt4 {text-align:center; color:#000000;}
.zt5 {text-align:right; color:#000000;}
.tb {width: 2000px; background-color:#999999;}
a.lj {font-size:12px; color:#ff9900; text-decoration:underline;}
a.lj:link {font-size:12px; color:#ff9900; text-decoration:underline;}
a.lj:visited {font-size:12px; color:#ff9900; text-decoration:underline;}
a.lj:hover {color:#ff3300;}
a.lj:active {color:#ff3300;}
.menu_bg { background-color:#fef3bb; padding-left:20px;padding-top:6px; padding-bottom:6px;border-bottom:#cf994b 1px solid; width:2000px;}
.menu_bg5 { background-color:#fef3bb; padding-left:20px;padding-top:6px; padding-bottom:6px;border-bottom:#cf994b 0px solid; width:2000px;}
.input_button {width:52px;height:23px;border:none;cursor:pointer; background:#ffffff url(../Include/Images/bt.gif) no-repeat;}
.input_longtextbutton {width:74px;height:23px;border:none;cursor:pointer; background:#ffffff url(../Include/Images/bt1.gif) no-repeat;}
.input_button1 {width:52px;height:23px;border:none;cursor:pointer; background:#ffffff url(../Include/Images/bt.gif) no-repeat;font-weight:bold;}
.input_button3 {width:95px;height:23px;border:none;background:#ffffff url(../Include/Images/bt2.gif) no-repeat;}
h2 {padding-left:20px;padding-top:10px;margin:0; width:2000px; background: url(../Include/Images/menu_title.gif) repeat-x;height:21px;font-size:14px; font-weight:600;}
.divbackground
{
z-index:9;display:none;position:absolute;width:1120px;height:1040px;left:0px;top:0px;background-color:#8C8C8C;opacity: 0.5;filter:alpha(opacity=50,finishopacity=50,style=1);}
.tx1{width:80px;}
.tx2{width:50px;}
</style>
<script type="text/javascript">
function setVIPValue(p)
{      debugger; 
   var tem=p.split(",");
   var temText ="";
 
   for(var i=0;i<tem.length;i++)
   {
        var gk=tem[i].split("|");
        if(gk[0]!="")
        {
                 temText = temText  +   gk[0]+ ",";
        }
   }
  document.getElementById("Tbx_CustomerCode").innerText  = temText.substr(0,temText.length-1);
          
}
         function MultiSearchVIP(path)
        {
	        var handle = window.showModalDialog(path+'DialogBoxHostFrame.aspx?url=MultiSelectSearchVIP.aspx', window,'status:off;center=yes;edge:raised;dialogHeight:500px;dialogWidth:720px;help:0;resizable:0;scrollbar=0');	 
	        if (handle != null && handle != '' && typeof handle != 'undefined') {
	            //__doPostBack("SearchProduct",handle);
	            if(handle=="0")
	            {
	            window.parent.frmright.location="../CustomerArchives/AddVIP.aspx?isorder=1";
	            }
	            else
	            {
	            setVIPValue(handle);
	            }
	        }
        }  
</script>
</head>
<body>
    <form id="form1" runat="server">
     <div align="Justify">
        <h2>订单明细统计</h2>
        <div class="menu_bg">
            <asp:Button ID="Btn_stac" runat="server" Text="统计" OnClick="Btn_stac_Click" />
            <asp:Button ID="Btn_Export" runat="server" Text="导出" OnClick="Btn_Export_Click" />
            <asp:Button ID="Btn_Clear" runat="server" Text="清空"  Visible="false" />
        </div>
        <div class="menu_bg">
        <table border="0" cellpadding="0" cellspacing="0">
            <tr>
                <td>订单编号:</td><td> <asp:TextBox ID="Tbx_OrderID" runat="server" CssClass="tx1"></asp:TextBox></td>
                <td>关联订单编号:</td><td> <asp:TextBox ID="Tbx_LinkOrder" runat="server" CssClass="tx1"></asp:TextBox></td>
                <td>订单来源:</td><td><input type="text" id="DDL_OrderFrom" runat="server" onclick="getOrderFrom('../')" readonly="readonly" class="tx1" /></td>
                <td>订单意见:</td><td><input type="text" id="DDL_ORDER_STATETYPECODE" runat="server" class="tx1" readonly="readonly" onclick="GetSuggestion('../')"/></td>
                <td style="display:none">制单人:</td><td style="display:none">
                                    <asp:DropDownList ID="DDL_OrderCreater" runat="server">
                                    </asp:DropDownList>
                                    </td>
                <td>制单日期:</td><td><asp:TextBox ID="Tbx_OrderCreateF" runat="server" CssClass="tx1" OnClick="setday(this)"></asp:TextBox>-<asp:TextBox ID="Tbx_OrderCreateT" runat="server" CssClass="tx1" OnClick="setday(this)"></asp:TextBox></td>                            
            </tr>
            <tr>
                <td>会员:</td><td><asp:TextBox ID="Tbx_CustomerCode" runat="server" CssClass="tx1"></asp:TextBox></td>
                <td></td><td></td>
                <td>交易类型:</td><td><input type="text" id="DDL_tradetype" runat="server" class="tx1" readonly="readonly" onclick="GetDealType('../')"/></td>
                <td>支付方式:</td><td><input type="text" id="DDL_PayType" runat="server"  class="tx1" readonly="readonly" onclick="GetPayType('../')"/></td>
                <td>审核日期:</td><td><asp:TextBox ID="Tbx_CheckDateF" runat="server" CssClass="tx1" OnClick="setday(this)"></asp:TextBox>-<asp:TextBox ID="Tbx_CheckDateT"  runat="server" CssClass="tx1" OnClick="setday(this)"></asp:TextBox></td>
            </tr>
            <tr>
                <td>审核:</td><td><asp:DropDownList ID="DDL_Check" runat="server">
                                    <asp:ListItem Value="-1">全部</asp:ListItem>
                                    <asp:ListItem Value="0">否</asp:ListItem>
                                    <asp:ListItem Value="1">是</asp:ListItem>
                                     </asp:DropDownList ></td>
                <td>财务审核:</td><td>
                                    <asp:DropDownList ID="DDL_Acheck" runat="server">
                                        <asp:ListItem Value="-1">全部</asp:ListItem>
                                        <asp:ListItem Value="0">否</asp:ListItem>
                                        <asp:ListItem Value="1">是</asp:ListItem>
                                    </asp:DropDownList></td>
                <td>发货:</td><td>
                                <asp:DropDownList ID="DDL_Send" runat="server">
                                <asp:ListItem Value="-1">全部</asp:ListItem>
                                <asp:ListItem Value="0">否</asp:ListItem>
                                <asp:ListItem Value="1">是</asp:ListItem>
                                </asp:DropDownList></td>
                <td>结算:</td><td>
                            <asp:DropDownList ID="DDL_Clear" runat="server">
                            <asp:ListItem Value="-1">全部</asp:ListItem>
                                                        <asp:ListItem Value="0">否</asp:ListItem>
                                                        <asp:ListItem Value="1">是</asp:ListItem>
                            </asp:DropDownList></td>
                <td>发货日期:</td><td> <asp:TextBox ID="Tbx_SendDateF" runat="server" CssClass="tx1" OnClick="setday(this)"></asp:TextBox>-<asp:TextBox ID="Tbx_SendDateT" runat="server" CssClass="tx1" OnClick="setday(this)"></asp:TextBox></td>
                
            </tr>
            <tr>
                <td>审核人:</td><td>
                                        <input type="text" id="DDL_Checker" runat="server" readonly="readonly" class="tx1" onclick="GetOperator('../',this.id)"/>
                </td>
                <td>财务审核人:</td><td>
                                        <input type="text" id="DDL_aChecker" runat="server" readonly="readonly" class="tx1" onclick="GetOperator('../',this.id)"/>
                </td>
                <td>发货人:</td><td>
                                        <input type="text" id="DDL_Sender" runat="server" readonly="readonly" class="tx1" onclick="GetOperator('../',this.id)"/>
                </td>
                <td>结算人:</td><td>
                                    <input type="text" id="DDL_Clearer" runat="server" readonly="readonly" class="tx1" onclick="GetOperator('../',this.id)"/>
                </td>
                <td>财务审核日期:</td><td><asp:TextBox ID="Tbx_AcheckDateF" runat="server" CssClass="tx1" OnClick="setday(this)"></asp:TextBox>-<asp:TextBox ID="Tbx_AcheckDateT" runat="server" CssClass="tx1" OnClick="setday(this)"></asp:TextBox></td>
            </tr>
            <tr>
                <td>商品金额范围:</td><td>
                            <asp:TextBox ID="Tbx_TamtF" runat="server" CssClass="tx2"></asp:TextBox>-<asp:TextBox ID="Tbx_TamtT" runat="server" CssClass="tx2"></asp:TextBox></td>
                <td>订单让利金额范围:</td><td>
                    <asp:TextBox ID="Tbx_RLF" runat="server" CssClass="tx2"></asp:TextBox>-<asp:TextBox ID="Tbx_RLT" runat="server" CssClass="tx2"></asp:TextBox></td>
                <td>订单实际金额范围:</td><td>
                    <asp:TextBox ID="Tbx_AAmtF" runat="server" CssClass="tx2"></asp:TextBox>-<asp:TextBox ID="Tbx_AAmtT"  runat="server" CssClass="tx2"></asp:TextBox></td>
                <td></td><td></td>
                <td>结算日期:</td><td><asp:TextBox ID="Tbx_ClearDateF" runat="server" CssClass="tx1" OnClick="setday(this)"></asp:TextBox>-<asp:TextBox ID="Tbx_ClearDateT" runat="server" CssClass="tx1" OnClick="setday(this)"></asp:TextBox></td>
            </tr>
            <tr>
                <td>是否有退单:</td><td>
                                <asp:DropDownList ID="DDL_TuiHuo" runat="server">
                                    <asp:ListItem Value="-1">全部</asp:ListItem>
                                    <asp:ListItem Value="0">否</asp:ListItem>
                                    <asp:ListItem Value="1">是</asp:ListItem>
                                </asp:DropDownList></td>
                <td>是否货到付款:</td><td>
                                        <asp:DropDownList ID="DDL_HDFK" runat="server">
                                        <asp:ListItem Value="-1">全部</asp:ListItem>
                                        <asp:ListItem Value="0">否</asp:ListItem>
                                        <asp:ListItem Value="1">是</asp:ListItem>
                                        </asp:DropDownList></td>
                                        <td>物流费用范围:</td>
                                        <td>                    
                                        <asp:TextBox ID="Tbx_TranCostF" runat="server" CssClass="tx2"></asp:TextBox>-<asp:TextBox ID="Tbx_TranCostT"  runat="server" CssClass="tx2"></asp:TextBox>
                                        </td>
               <td style="display:none">是否缺货订单:</td><td style="display:none">
                                    <asp:DropDownList ID="DDL_QueHuo" runat="server">
                                        <asp:ListItem Value="-1">全部</asp:ListItem>
                                        <asp:ListItem Value="0">否</asp:ListItem>
                                        <asp:ListItem Value="1">是</asp:ListItem>
                                    </asp:DropDownList></td>
                <td>作废:</td><td>
                    <asp:DropDownList ID="DDL_ZF" runat="server">
                    <asp:ListItem Value="-1">全部</asp:ListItem>
                    <asp:ListItem Value="0">否</asp:ListItem>
                    <asp:ListItem Value="1">是</asp:ListItem>
                    </asp:DropDownList></td>
                <td>作废日期:</td><td>
                    <asp:TextBox ID="Tbx_ZFDateF" runat="server" CssClass="tx1" OnClick="setday(this)"></asp:TextBox>-<asp:TextBox ID="Tbx_ZFDateT" runat="server" CssClass="tx1" OnClick="setday(this)"></asp:TextBox></td>
            </tr>
            <tr style="display:none">
                <td>配送站:</td><td>
                                <asp:DropDownList ID="DDL_ServerState" runat="server">
                                </asp:DropDownList></td>
            </tr>
        </table>
        </div>
        <div class="juli" style="min-height:200px">
            <asp:Repeater ID="Repeater1" runat="server" OnItemDataBound="Repeater1_ItemDataBound">
                 <HeaderTemplate>
                    <table class="tb" border="0" cellpadding="0" cellspacing="1" id="printTable" >
                        <tr class="z1">
                            <td class="zt3">订单编号</td>
                            <td class="zt3">订单来源</td>
                            <td class="zt3">会员账号</td>
                            <td class="zt3">会员姓名</td>
                            <td class="zt3">会员昵称</td>
                            <td class="zt3">手机号</td>
                            <td class="zt3" style="display:none">制单人</td>
                            <td class="zt3">制单时间</td>
                            <td class="zt3">商品数量</td>
                            <td class="zt3">商品金额</td>
                            <td class="zt3">物流费用</td>
                            <td class="zt3">让利金额</td>
                            <td class="zt3">实际金额</td>
                            <td class="zt3">审核</td>
                            <td class="zt3">财务审核</td>
                            <td class="zt3">发货</td>
                            <td class="zt3">结算</td>
                            <td class="zt3">配送方式</td>
                            <td class="zt3">配送站</td>
                            <td class="zt3">审核人</td>
                            <td class="zt3">审核时间</td>
                            <td class="zt3">财务审核人</td>
                            <td class="zt3">财务审核时间</td>
                            <td class="zt3">发货人</td>
                            <td class="zt3">发货时间</td>
                            <td class="zt3">结算时间</td>
                            <td class="zt3">客户要求</td>
                            <td class="zt3">备注</td>
                            <td class="zt3">订单意见</td>
                       </tr>
                </HeaderTemplate>
                <ItemTemplate>
                    <tr class="z2">
                        <td class="zt4"><%#Eval("ORDER_ID")%></td>
                        <td class="zt4"><%#Eval("ORDERFROM") %></td>
                        <td class="zt4"><%#Eval("ORDER_CUSTOMERCODE") %></td>
                        <td class="zt4"><%#Eval("CustomerName")%></td>
                        <td class="zt4"><%#Eval("CustomerNike")%></td>
                        <td class="zt4"><%#Eval("Phone")%></td>
                        <td class="zt4" style="display:none"><%#Eval("ORDER_CREATER")%></td>
                        <td class="zt4"><%#Eval("ORDER_CREATEDATE")%></td>
                        <td class="zt4"><%#Eval("ORDER_QTY")%></td>
                        <td class="zt4"><%#Eval("ORDER_AMT","{0:F}")%></td>
                        <td class="zt4"><%#Eval("ORDER_TRANCOST","{0:F}")%></td>
                        <td class="zt4"><%#Eval("ORDER_OFFERAMT","{0:F}")%></td>
                        <td class="zt4"><%#Eval("ORDER_AAMT","{0:F}")%></td>
                        <td class="zt4"><asp:CheckBox ID="CheckBox1" runat="server" Checked='<%#Eval("ORDER_CHECK").ToString()=="1"?true:false %>' Enabled="false" /></td>
                        <td class="zt4"><asp:CheckBox ID="CheckBox2" runat="server" Checked='<%#Eval("ORDER_ACHECK").ToString()=="1"?true:false %>' Enabled="false" /></td>
                        <td class="zt4"><asp:CheckBox ID="CheckBox3" runat="server" Checked='<%#Eval("ORDER_SEND").ToString()=="1"?true:false %>' Enabled="false" /></td>
                        <td class="zt4"><asp:CheckBox ID="CheckBox4" runat="server" Checked='<%#Eval("ORDER_CLEAR").ToString()=="1"?true:false %>' Enabled="false" /></td>
                        <td class="zt4"><%#Eval("SendMethod") %></td>
                        <td class="zt4"><%#Eval("ServiceName") %></td>
                        <td class="zt4"><%#Eval("ORDER_CHECKER") %></td>
                        <td class="zt4"><%#Eval("ORDER_CHECKDATE") %></td>
                        <td class="zt4"><%#Eval("ORDER_ACHECKER")%></td>
                        <td class="zt4"><%#Eval("ORDER_ACHECKDATE")%></td>
                        <td class="zt4"><%#Eval("ORDER_SENDER")%></td>
                        <td class="zt4"><%#Eval("ORDER_SENDDATE")%></td>
                        <td class="zt4"><%#Eval("BYZD9")%></td>
                        <td class="zt4">
                            <asp:Label ID="Label1" runat="server" Text='<%#Eval("BYZD19")%>' ToolTip='<%#Eval("BYZD19")%>'></asp:Label>
                        </td>
                        <td class="zt4"><%#Eval("ORDER_NOTE")%></td>
                        <td class="zt4"><%#Eval("ST_NAME")%></td>
                    </tr>
                </ItemTemplate>
                <FooterTemplate>
                    <tr class="z2">
                            <td class="zt3"><asp:Label ID="lbl_Num_SUM" runat="server" Text=""></asp:Label></td>
                            <td class="zt3">&nbsp;</td>
                            <td class="zt3">&nbsp;</td>
                            <td class="zt3">&nbsp;</td>
                            <td class="zt3">&nbsp;</td>
                            <td class="zt3">&nbsp;</td>
                            <td class="zt3" style="display:none">&nbsp;</td>
                            <td class="zt3">&nbsp;</td>
                            <td class="zt3"><asp:Label ID="lbl_SL_SUM" runat="server" Text=""></asp:Label></td>
                            <td class="zt3"><asp:Label ID="lbl_SPJE_SUM" runat="server" Text=""></asp:Label></td>
                            <td class="zt3"><asp:Label ID="lbl_WL_SUM" runat="server" Text=""></asp:Label></td>
                            <td class="zt3"><asp:Label ID="lbl_RL_SUM" runat="server" Text=""></asp:Label></td>
                            <td class="zt3"><asp:Label ID="lbl_SJJE_SUM" runat="server" Text=""></asp:Label></td>
                            <td class="zt3">&nbsp;</td>
                            <td class="zt3">&nbsp;</td>
                            <td class="zt3">&nbsp;</td>
                            <td class="zt3">&nbsp;</td>
                            <td class="zt3">&nbsp;</td>
                            <td class="zt3">&nbsp;</td>
                            <td class="zt3">&nbsp;</td>
                            <td class="zt3">&nbsp;</td>
                            <td class="zt3">&nbsp;</td>
                            <td class="zt3">&nbsp;</td>
                            <td class="zt3">&nbsp;</td>
                            <td class="zt3">&nbsp;</td>
                            <td class="zt3">&nbsp;</td>
                            <td class="zt3">&nbsp;</td>
                            <td class="zt3">&nbsp;</td>
                            <td class="zt3">&nbsp;</td>
                       </tr>
                    </table>
                </FooterTemplate>
            </asp:Repeater>
        </div>        
    </div>
    </form>
</body>
</html>
